package com.briup.myblog.utils;

public class ResultUtil {
    private ResultUtil() {
    }

    public static Result success() {
        return new Result(ResultStatus.SUCCESS);
    }

    public static Result success(Object data) {
        return new Result(ResultStatus.SUCCESS, data);
    }

    public static Result error() {
        return new Result(ResultStatus.ERROR);
    }

    public static Result error_null() {
        return new Result(ResultStatus.USER_NOT_FOUND);
    }

    public static Result error_mmcw() {
        return new Result(ResultStatus.ERROR_MMCW);
    }

    public static Result error_lunbo() {
        return new Result(ResultStatus.ERROR_LUNBO);
    }

    public static Result error_lock() {
        return new Result(ResultStatus.ERROR_LOCK);
    }

    public static Result error(Object data) {
        return new Result(ResultStatus.ERROR, data);
    }

    public static Result error(ResultStatus resultStatus) {
        return new Result(resultStatus);
    }

    public static Result error(ResultStatus resultStatus, Object data) {
        return new Result(resultStatus, data);
    }

    public static Result error(String message) {
        return new Result(0, message);
    }
}